home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue45 / Clinic / NewHntsU.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-11-02  |  1.2 KB  |  52 lines

  1. unit NewHntsU;
  2.  
  3. interface
  4.  
  5. uses
  6.   WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  7.   Dialogs, Db, DBTables, StdCtrls, Grids, DBGrids, DBHntGrd;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     HintDBGrid1: THintDBGrid;
  12.     Table1: TTable;
  13.     DataSource1: TDataSource;
  14.     chkTitles: TCheckBox;
  15.     chkIndicator: TCheckBox;
  16.     Table1SpeciesNo: TFloatField;
  17.     Table1Category: TStringField;
  18.     Table1Common_Name: TStringField;
  19.     Table1SpeciesName: TStringField;
  20.     Table1Lengthcm: TFloatField;
  21.     Table1Length_In: TFloatField;
  22.     Table1Notes: TMemoField;
  23.     Table1Graphic: TGraphicField;
  24.     procedure chkTitlesClick(Sender: TObject);
  25.     procedure chkIndicatorClick(Sender: TObject);
  26.   end;
  27.  
  28. var
  29.   Form1: TForm1;
  30.  
  31. implementation
  32.  
  33. {$R *.DFM}
  34.  
  35. procedure TForm1.chkTitlesClick(Sender: TObject);
  36. begin
  37.   if chkTitles.Checked then
  38.     HintDBGrid1.Options := HintDBGrid1.Options + [dgTitles]
  39.   else
  40.     HintDBGrid1.Options := HintDBGrid1.Options - [dgTitles]
  41. end;
  42.  
  43. procedure TForm1.chkIndicatorClick(Sender: TObject);
  44. begin
  45.   if chkIndicator.Checked then
  46.     HintDBGrid1.Options := HintDBGrid1.Options + [dgIndicator]
  47.   else
  48.     HintDBGrid1.Options := HintDBGrid1.Options - [dgIndicator]
  49. end;
  50.  
  51. end.
  52.